import * as types from './mutations-types'

const mutations = {
    [types.SET_SINGER](state, singer) {
        state.singer = singer
    },
    [types.SET_PLAYING_STATE](state, flag) {
        state.playing = flag
    },
    [types.SET_FULL_SCREEN](state, flag) {
        state.fullScreen = flag
    },
    [types.SET_PLAYLIST](state, list) {
        state.playlist = list
    },
    [types.SET_SEQUENCE_LIST](state, list) {
        state.sequenceList = list
    },
    [types.SET_PLAY_MODE](state, mode) {
        state.mode = mode
    },
    [types.SET_CURRENT_INDEX](state, index) {
        state.currentIndex = index
    },
    [types.SET_MUSIC_URL](state, musicUrl) {
         state.musicUrl = musicUrl
    },
    [types.SET_DISC](state, disc) {
        state.disc = disc
    },
    [types.SET_TOP_LIST](state, toplist) {
        state.topList = toplist
    },
    [types.SET_DISTRIBUTION](state, obj){
        state.distribution.distributionGroup = obj
    },
    [types.SET_JURISDICTION](state, obj){
        state.jurisdiction = obj
    },
    [types.SET_UE_CHOSE](state, obj){
        state.ueChose = state.ueChose?false:true;
    },
    [types.SET_GOODS_CLASSIFY](state, obj) {
        console.log(555)
        state.goodsclassify = obj
    },
    [types.SET_LIMIT_AMBIENT](state, result) {
        state.limit_ambient = result
    },
    [types.SET_TO_LOGIN](state, result) {
        state.toLoginOff = result
    },

    changeShowMode(state, result) {
        state.showModeData = result
    }
}

export default mutations